import type { InternalAxiosRequestConfig } from 'axios'
import Cookies from "js-cookie";
export const requestInterceptor = (config: InternalAxiosRequestConfig<any>) => {
  config.headers['Content-Type'] = 'application/x-www-form-urlencoded'
  config.headers!.token = Cookies.get("access_token") || ""
  return config
}

export const requestInterceptorCatch = (err: any) => {
  // 请求错误，这里可以用全局提示框进行提示
  return Promise.reject(err)
}
